<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<%@ include file="../common/header.jsp"%>

<div id="saper-container">
    <div id="saper-hd"></div>
    <div id="saper-bd">
        <div class="subfiled clearfix">
            <h2>${titleName}</h2>
        </div>
        <div class="subfiled-content">
            <div class="tab-container" data-trigger="click">

                <div class="tab-content">
                    <div class="tab-content-item" city-item="grid-report">
                        <div class="subfiled-content">
                            <form class="saper-form">
                                <div class="kv-item clearfix">
                                    <label>关键字搜索:&nbsp;</label>
                                    <div class="kv-item-content">
                                        <input type="text" placeholder="请输入要查询的关键字" />
                                    </div>
                                </div>
                            </form>
                            <!--表格开始-->
                            <div class="table">
                                <table>
                                    <thead>
                                        <tr>
                                            <th>任务编号</th>
                                            <th>事件名</th>
                                            <th>上报类别</th>
                                            <th>事件类别</th>
                                            <th>上报人</th>
                                            <th>上报时间</th>
                                            <th>状态</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <c:forEach items="${reportList}" var="format">
                                            <tr>
                                                <td>${format.taskId}</td>
                                                <td>${format.title}</td>
                                                <td>${format.categoryName}</td>
                                                <td>
                                                    ${format.typeBigName}
                                                    <c:if test="${format.typeSmallName != null}">
                                                        &nbsp;&nbsp;${format.typeSmallName}
                                                    </c:if>
                                                </td>
                                                <td>${format.reportName}</td>
                                                <td>${format.createTimeName}</td>
                                                <td>${format.scheduleName}</td>
                                                <td>
                                                    <button class="layui-btn layui-btn-xs" city-detail="detail" detail-id="${format.id}">详情</button>
                                                    <button class="layui-btn layui-btn-danger layui-btn-xs" city-event="report-del" event-id="${format.id}">删除</button>
                                                </td>
                                            </tr>
                                        </c:forEach>
                                    </tbody>
                                </table>
                            </div>
                            <!--表格结束-->


                            <div class="pagging" style="text-align: center">
                                <div class="left">共${reportNum}条记录</div>
                                <div class="right">
                                    <c:if test="${currentPage == 1}">
                                        <span class="disabled"><< 前一页</span>
                                    </c:if>
                                    <c:if test="${currentPage != 1}">
                                        <a href="/colligate/dispose?page=${currentPage-1}"><< 前一页</a>
                                    </c:if>
                                    <c:if test="${currentPage == 1}">
                                        <span class="current">1</span>
                                    </c:if>
                                    <c:if test="${currentPage != 1}">
                                        <a href="/colligate/dispose?page=1">1</a>
                                    </c:if>
                                    <%
                                        long pageTimes = (long) session.getAttribute("pageTimes");
                                        for (int i = 1; i < pageTimes; i++) {
                                            request.setAttribute("page", i + 1);

                                    %>
                                    <c:if test="${currentPage == page}">
                                        <span class="current"><%=i + 1%></span>
                                    </c:if>
                                    <c:if test="${currentPage != page}">
                                        <a href="/colligate/dispose?page=<%=i+1%>"><%=i + 1%>
                                        </a>
                                    </c:if>
                                    <%} %>

                                    <c:if test="${currentPage == pageTimes}">
                                        <span class="disabled">后一页 >></span>
                                    </c:if>
                                    <c:if test="${currentPage != pageTimes}">
                                        <a href="/colligate/dispose?page=${currentPage+1}">后一页 >></a>
                                    </c:if>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <div id="saper-ft"></div>
</div>



<%@ include file="../common/footer.jsp"%>
